package com.design.AdapterMode.demo;

public class FilterService {

//    private Filter1 filter1 = new Filter1();
//    private Filter2 filter2 = new Filter2();
//    private Filter3 filter3 = new Filter3();

    public String filter(String word){
        Filter3 filter3 = new Filter3();
        final Word build = Word.builder().word(word).replace("*").build();
//        word = filter1.filter(build);
//        word = filter2.filter(build, "*");
        word = filter3.filter(build, 1);
        return word;
    }

}
